From a465127f809bd3e9bc29b56fe48a41eccc2eef24 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 11 Jun 2006 18:23:07 +0000 Subject: [PATCH] Check pointers before xfree. --- an1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/an1.c b/an1.c index 00e4ea735..134335ee2 100644 --- a/an1.c +++ b/an1.c @@ -304,9 +304,9 @@ void Destroy_AN1_Waypoint( void *vwpt ) { an1_waypoint_record *wpt = (an1_waypoint_record *)vwpt; xfree( wpt->name ); xfree( wpt->fontname ); - xfree( wpt->url ); - xfree( wpt->comment ); - xfree( wpt->image_name ); + if ( wpt->url ) xfree( wpt->url ); + if ( wpt->comment ) xfree( wpt->comment ); + if ( wpt->image_name ) xfree( wpt->image_name ); xfree( vwpt ); } -- 2.30.2